/**
 * @Author: Hhx06
 * @Email: huangshm@yoozoo.com
 * @Description:
 * @File:  doReq
 * @Version: 1.0.0
 * @Date: 2022/06/07 10:23
 */

package message

import (
	"github.com/eyotang/boomer"
	"httpTemplate/cache"
	"httpTemplate/stats"
)

func DoReq(ctx boomer.Context) (err error) {
	start := boomer.Now()
	r := cache.GetRedis()
	_, err = r.Incr("ob-hhx-rInt")
	if err != nil {
		stats.RecordFailure("redis", "incrWrong", boomer.Now()-start, err.Error())
		return
	} else {
		stats.RecordSuccess("redis", "incr-success", boomer.Now()-start, 0)
	}
	r.Close()
	return
}
